#!/usr/bin/env gawk -f

# Gmsh .msh file to .mesh (or .ele)
# Basile Clout, November 2007

# print number of elements
BEGIN{cnt=0}
NF == 1 {if (cnt==1) {print $1 " 1"}}
$1 == "$Elements" {cnt++}
$1 == "$EndElements" {cnt=0}
$2 == 2 {if (cnt>0){print $7 " " $8 " " $9; cnt++}}


